<script setup>
defineProps({
  showimg: {
    type: Boolean,
    default: true,
  },
  title: {
    type: String,
    default: '暂无数据',
  },
})
</script>

<template>
  <view class="no-data">
    <image v-if="showimg" src="/static/images/noData.png" mode="widthFix">
    </image>
    <text>{{ title }}</text>
  </view>
</template>

<style lang="scss">
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 30%;

  image {
    width: 300rpx;
    margin-bottom: 20rpx;
  }

  text {
    font-size: 30rpx;
    color: #464a57;
  }
}
</style>
